<%--
  Created by IntelliJ IDEA.
  User: 1daon
  Date: 2019/1/16
  Time: 9:10 PM
  To change this template use File | Settings | File Templates.
--%>
<%@ page import="com.daon.common.RequestHolder" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>

<head>
    <jsp:include page="../common/backend_head.jsp"/>
</head>

<body class="layui-layout-body">
<div id="LAY_app">
    <div class="layui-layout layui-layout-admin">
        <div class="layui-header">
            <!-- 头部区域 -->
            <ul class="layui-nav layui-layout-left">
                <li class="layui-nav-item layadmin-flexible">
                    <a href="javascript:;" title="侧边伸缩">
                        <i class="layui-icon layui-icon-shrink-right" id="app_flexible"></i>
                    </a>
                </li>
            </ul>
            <ul class="layui-nav layui-layout-right">
                <li class="layui-nav-item">
                    <a href="javascript:;" style="padding: 0 10px;">
                        <i class="layui-icon layui-icon-notice"></i>
                        <span class="layui-badge-dot"></span>
                    </a>
                </li>
                <li class="layui-nav-item" style="margin-right: 10px;">
                    <a href="javascript:;">
                        <cite>
                            <notempty name="user_avatar">
                                <img src="${ RequestHolder.getCurrentUser().getUserAvatar() }"
                                     style="width: 16px; height: 16px; border-radius: 8px;margin-bottom: 3px;">
                            </notempty>
                            ${ RequestHolder.getCurrentUser().getUserTrueName() }
                        </cite>
                        <i class="layui-nav-more"></i>
                    </a>
                    <dl class="layui-nav-child">
                        <dd>
                            <a class="base-info" lay-href="/sys/sysUser/userBaseInformation.page?userId=${RequestHolder.getCurrentUser().getUserId()}"><i class="iconfont icon-settings_light"></i> 基本资料</a>
                        </dd>
                        <dd>
                            <a lay-href="set/security/"><i class="iconfont icon-safe"></i> 安全设置</a>
                        </dd>
                        <hr/>
                        <dd style="text-align: center;">
                            <a href="/sys/login/logout.page"><i class="iconfont icon-exit"></i> 退出</a>
                        </dd>
                    </dl>
                </li>
            </ul>
        </div>
        <!-- 侧边菜单 -->
        <div class="layui-side layui-side-menu">
            <div class="layui-side-scroll">
                <div class="layui-logo iconfont icon-boshimao">
                    <span>包头市领导干部包联服务重点民营企业专项行动工作管理平台</span>
                </div>
                <c:forEach items="${sysNodeTree}" var="item" varStatus="s">
                    <ul class="layui-nav layui-nav-tree" id="menu-${item.nodeId}" style="${s.count != 1 ? 'display: none;' : ''}">
                        <c:forEach items="${item.childList}" var="subItem">
                            <li class="layui-nav-item layui-nav-itemed">
                                <a href="javascript:;" data-title="${subItem.nodeName}">
                                    <i class="${subItem.nodeIcon}"></i>
                                    <cite>${subItem.nodeName}</cite>
                                    <span class="layui-nav-more"></span>
                                </a>
                                <dl class="layui-nav-child">
                                    <c:forEach items="${subItem.childList}" var="subSubItem">
                                        <c:if test="${subSubItem.nodeType == 1 || subSubItem.nodeType == 2}">
                                            <dd data-href="${subSubItem.nodeUrl}" data-title="${subSubItem.nodeName}">
                                                <i class="${subSubItem.nodeIcon}"></i>
                                                <a href="javascript:;">${subSubItem.nodeName}</a>
                                            </dd>
                                        </c:if>
                                    </c:forEach>
                                </dl>
                            </li>
                        </c:forEach>
                    </ul>
                </c:forEach>
            </div>
        </div>
        <!-- 页面标签 -->
        <div class="layadmin-pagetabs">
            <div class="layui-icon layadmin-tabs-control layui-icon-prev" id="left-move-tab"></div>
            <div class="layui-icon layadmin-tabs-control layui-icon-next" id="right-move-tab"></div>
            <div class="layui-icon layadmin-tabs-control layui-icon-refresh" id="frame-refresh-tab"></div>
            <div class="layui-icon layadmin-tabs-control layui-icon-down">
                <ul class="layui-nav layadmin-tabs-select">
                    <li class="layui-nav-item" lay-unselect>
                        <a href="javascript:;">
                            <span class="layui-nav-more"></span>
                        </a>
                        <dl class="layui-nav-child layui-anim-fadein">
                            <dd id="close-this-tab">
                                <a href="javascript:;">关闭当前标签页</a>
                            </dd>
                            <dd id="close-other-tab">
                                <a href="javascript:;">关闭其它标签页</a>
                            </dd>
                            <dd id="close-all-tab">
                                <a href="javascript:;">关闭全部标签页</a>
                            </dd>
                        </dl>
                    </li>
                </ul>
            </div>
            <div class="layui-tab">
                <ul class="layui-tab-title" id="layadmin-tab-header">
                    <!-- tab页内容 -->
                </ul>
            </div>
        </div>
        <!-- 主体内容 -->
        <div class="layui-body" id="layadmin-tab-content">
            <!-- 内容页 -->
        </div>
        <!-- 辅助元素，一般用于移动设备下遮罩 -->
        <div class="layadmin-body-shade" layadmin-event="shade"></div>
    </div>
</div>
</body>
<jsp:include page="../common/backend_script.jsp"/>
<script type="text/javascript">
    $(document).ready(function () {
        // 添加默认页面
        navtab.addTab({
            id: 'default',
            url: '/sys/default.page',
            title: '',
            canClose: false,
            iconClass: 'layui-icon layui-icon-home'
        });
        $('.base-info').click(function(){
            var url = $(this).attr("lay-href");
            var tabName = $(this).text();
            navtab.addTab({
                url: url,
                title: tabName
            });
        });
    });
</script>

</html>
